package com.yangrui.app.service;

import com.yangrui.app.entity.User;
import org.springframework.stereotype.Service;

@Service
public interface UserService {
    /**
     * 注册
     * @param user
     * @return 1 注册成功，0 注册失败 -1 参数异常
     */
    int register(User user);
    /**
     * 登录
     * @param username
     * @param password
     * return user
     */
    User login(String username, String password);

    /**
     * 根据主键查询
     * @param id
     * @return user
     */
    User selectById(int id);
}
